package com.atzzy.ysmall.ysmall_otherserviceimpl;

import com.alibaba.dubbo.config.annotation.Service;
import com.atzzy.ysmall.ysmall_allService.IndexService.IndexImgService;
import com.atzzy.ysmall.ysmall_beans.IndexImg;
import com.atzzy.ysmall.ysmall_common.vo.R;
import com.atzzy.ysmall.ysmall_mapper.OtherMapper;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author JAVAZeng
 * @Date 2022/3/1 22:09
 * @Version 1.0
 */
@Service
@Component("IndexImgServiceImpl")
public class IndexImgServiceImpl implements IndexImgService {

    @Resource
    private OtherMapper otherMapper;
    @Override
    public R listIndexImgs() {
        List<IndexImg> indexImgs = otherMapper.listIndexImgs();
        if(indexImgs.size()==0)
        {
            return new R(501,"fail",null);
        }else {
        return new R(201,"success",indexImgs);
        }

    }
}
